#include<stack>
#include<iostream>
using namespace std;
int maxsize;//最大容量
stack<int>s1;
stack<int>s2;
bool dm(){
    if(s1.size()+s2.size()==maxsize)return 1;
    else return 0;
}
void rd(int x){
    s1.push(x);
}
void cd(){
    if(!dk()){
        if(s2.empty()){
        while(!s1.empty()){
            int n=s1.top();
            s1.pop();
            s2.push(n);
        }
    }
    s2.pop();
    }
}
bool dk(){
    if(s1.empty()&&s2.empty())return 1;
    return 0;
}
